export function cached(fn) {
  var cache = Object.create(null);
  return function cachedFn(str) {
    var hit = cache[str];
    return hit || (cache[str] = fn(str));
  };
}
export function cached2n(fn) {
  var cache = Object.create(null);
  return function cachedFn(str1,str2) {
    var hit = cache[str1+':'+str2];
    return hit || (cache[str1+':'+str2] = fn(str1,str2));
  };
}
